package com.maixy.esdemo.test;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

import java.io.IOException;

/**
 * @ClassName ESTestClient
 * @Description TODO
 * @Date 2021/4/16 22:04
 * @Author maixy
 */
public class ESTestClient {
    public static void main(String[] args) throws IOException {
        //创建ES客户端
        RestHighLevelClient esClient =new RestHighLevelClient(
                RestClient.builder(new HttpHost("localhost",9200, "http")));


        esClient.close();
    }
}
